package com.jzx.provider.cv.repository;

import com.jzx.provider.cv.model.ComName;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Created by dhh on 2019/12/21
 */
public interface ComNameRepository extends JpaRepository<ComName, Integer> {
    @Query(nativeQuery = true, value = "select * from t_com_name limit :start,:end")
    List<ComName> findByPage(@Param("start") Integer start, @Param("end") Integer end);

    ComName findByNameOrShortName(String name,String shortName);
}
